<template id='cardTips'>
    <div class="cardTips">
        <el-dialog :visible.sync="options.isShow" :show-close="false" :before-close="handleClose"
            :close-on-click-modal="false" :close-on-press-escape="false" center top="40vh">
            <p class="notesTitle">提示</p>
            <span class="notesDesc">{{ desc }}</span>
            <span slot="footer" class="dialog-footer">
                <div class="pc">
                    <div class="btn" @click="cancel">取消</div>
                    <div class="btn continue" @click="confirm('pc')">确定</div>
                </div>
                <div class="phone">
                    <div class="btn" @click="cancel">取消</div>
                    <div class="btn continue" @click="confirm('phone')">确定</div>
                </div>
            </span>
        </el-dialog>
    </div>
</template>

<script>
// 这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）

export default {
    name: 'cardTips',
    components: {
    },
    props: {
        options: {
            type: Object,
        },
    },
    // 定义属性
    data() {
        return {
            desc: "订单信息已存在，请到订单列表进行支付。"
        }
    },
    // 计算属性，会监听依赖属性值随之变化
    computed: {
    },
    // 监控data中的数据变化
    watch: {},
    // 方法集合
    methods: {
        //关闭弹窗
        handleClose() { },
        //取消
        cancel() {
            this.$emit('cancel')
        },
        //确定
        confirm(type) {
            this.$emit('confirm', type)
        },
    },
    // 生命周期 - 创建完成（可以访问当前this实例）
    created() {

    },
    // 生命周期 - 挂载完成（可以访问DOM元素）
    mounted() {

    },
    beforeCreate() { }, // 生命周期 - 创建之前
    beforeMount() { }, // 生命周期 - 挂载之前
    beforeUpdate() { }, // 生命周期 - 更新之前
    updated() { }, // 生命周期 - 更新之后
    beforeDestroy() { }, // 生命周期 - 销毁之前
    destroyed() { }, // 生命周期 - 销毁完成
    activated() { }, // 如果页面有keep-alive缓存功能，这个函数会触发
}
</script>

<style lang='less' scoped>
.cardTips {
    p {
        margin: 0;
    }

    /deep/.el-dialog {
        width: 500px;
        background: #1e2020;
        border-radius: 10px;

        .el-dialog__header {
            display: none;
        }

        .el-dialog__body {
            .notesTitle {
                font-size: 18px;
                font-family: PingFangSC-Semibold, PingFang SC;
                font-weight: 600;
                color: #ffffff;
                text-align: center;
                margin-bottom: 20px;
            }

            .notesDesc {
                font-size: 14px;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #666666;
            }

            .noTips {
                margin-top: 20px;
                display: flex;
                align-items: center;

                p {
                    margin: 0;
                    font-size: 14px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #666666;
                    cursor: pointer;
                }

                .isClickP {
                    color: #00ffb0;
                }

                .tipClick {
                    cursor: pointer;
                    background: url("~@/assets/images/buyNotes/unClick.png");
                    width: 14px;
                    height: 14px;
                    background-size: 100% 100%;
                    margin-right: 10px;
                }

                .isClick {
                    background: url("~@/assets/images/buyNotes/onClick.png");
                    width: 14px;
                    height: 14px;
                    background-size: 100% 100%;
                }
            }
        }

        .el-dialog__footer {
            .dialog-footer {
                .pc {
                    display: flex;
                    justify-content: flex-end;

                    .btn {
                        cursor: pointer;
                        padding: 10px 18px;
                        font-size: 14px;
                        font-family: PingFangSC-Medium, PingFang SC;
                        font-weight: 500;
                        color: #999999;
                        background: #1e2020;
                        border-radius: 4px;
                        border: 1px solid #666666;
                    }

                    .continue {
                        margin-left: 15px;
                        color: #1e2020;
                        background: #00ffb0;
                    }
                }

                .phone {
                    display: none;
                }
            }
        }
    }
}

@media screen and (max-width: 768px) {
    .cardTips {
        /deep/.el-dialog {
            width: 75%;

            .el-dialog__body {
                padding: 50px;

                .notesTitle {
                    font-size: 36px;
                    margin-bottom: 30px;
                }

                .notesDesc {
                    font-size: 24px;
                    line-height: 1.5;
                }

                .noTips {

                    .tipClick,
                    .isClick {
                        width: 24px;
                        height: 24px;
                        margin-right: 20px;
                    }

                    p {
                        font-size: 24px;
                    }
                }
            }

            .el-dialog__footer {
                border-top: 2px #888888 solid;
                padding: 0;

                .dialog-footer {
                    .pc {
                        display: none;
                    }

                    .phone {
                        display: flex;
                        justify-content: space-between;

                        .btn {
                            padding: 40px 0;
                            flex: 1;
                            font-size: 36px;
                            font-family: PingFangSC-Medium, PingFang SC;
                            font-weight: 500;
                            color: #999999;
                        }

                        .continue {
                            color: #00ffb0;
                            border-left: 2px #888888 solid;
                        }
                    }
                }
            }
        }
    }
}
</style>